/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * POS__admin__mode.java
 *
 * Created on May 20, 2010, 9:59:19 AM
 */

package point.of.sale.app;

import java.awt.Image;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.channels.FileChannel;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Vector;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.ImageIcon;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.table.TableModel;

/**
 *
 * @author card3r
 */
public class POS__admin__mode extends javax.swing.JFrame {
    private SQLHandler SQL_HANDLER = null;
    private Vector<Integer> id_client = null;
    private Vector<Integer> id_produs = null;
    private Vector<Integer> quantity = null;
    private Vector<Integer> id_produs_comandat = null;
    JFileChooser s;
    Integer id_produs_selectat = 0;
    private TableModel tmodel = null;
    private ImageIcon icon =null;
    Integer idx;
    /** Creates new form POS__admin__mode */
    public POS__admin__mode() {
        try {
            /**
             * @POS__admin__mode()
             * +setez look and feel
             * +instantiez clasa care lucreaza cu baza de date
             */
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
            SQL_HANDLER = new SQLHandler();
            TAB_GESTIONARE_CLIENTI_ON_INIT();
            initComponents();
            setLocationRelativeTo(null);
            TAB_CLIENTI_EXISTENTI_CAUTA();
            PRODUCT_TAB_ON_INIT();
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(POS__admin__mode.class.getName()).log(Level.SEVERE, null, ex);
            JOptionPane.showMessageDialog(null, ex.toString());
        } catch (InstantiationException ex) {
            Logger.getLogger(POS__admin__mode.class.getName()).log(Level.SEVERE, null, ex);
            JOptionPane.showMessageDialog(null, ex.toString());
        } catch (IllegalAccessException ex) {
            Logger.getLogger(POS__admin__mode.class.getName()).log(Level.SEVERE, null, ex);
            JOptionPane.showMessageDialog(null, ex.toString());
        } catch (UnsupportedLookAndFeelException ex) {
            Logger.getLogger(POS__admin__mode.class.getName()).log(Level.SEVERE, null, ex);
            JOptionPane.showMessageDialog(null, ex.toString());
        }
    }

    public void PRODUCT_TAB_ON_INIT()
    {
        TableProduse.setModel(new t_Model("SELECT * FROM produs"));
        TableProduse.revalidate();
        GP_DenTextField.setText("");
        GP_Con_TextArea.setText("");
        GP_PretTextField.setText("");
        GP_DETAILS_CONTINUTTextArea.setText("");
        GP_DETAILS_NUMETextField.setText("");
        GP_DETAILS_PRETTextField.setText("");

    }
    public void TAB_CLIENTI_EXISTENTI_CAUTA()
    {
        try {
            id_client =new Vector();
            id_client.clear();
            String nume = TAB_CLIENTI_EXISTENTI_NUME_TextField.getText();
            String prenume = TAB_CLIENTI_EXISTENTI_PRENUME_TextField.getText();
            String telefon = TAB_CLIENTI_EXISTENTI_TELEFON_TextField.getText();
            ResultSet rs = SQL_HANDLER.searchMysql(nume, prenume, telefon);
            listCautareClienti.removeAll();
            while(rs.next())
            {
                Integer rs_id_client = rs.getInt("id_client");
                String rs_nume = rs.getString("nume");
                String rs_prenume = rs.getString("prenume");
                String rs_telefon = rs.getString("telefon");
                listCautareClienti.add("NUME: "+rs_nume+" "+rs_prenume+" TELEFON: "+rs_telefon);
                id_client.add(rs_id_client);
            }
        } catch (SQLException ex) {
            Logger.getLogger(POS__admin__mode.class.getName()).log(Level.SEVERE, null, ex);
            JOptionPane.showMessageDialog(null, ex.toString());
        }

    }
    private void TAB_CLIENTI_NOI_INITIALIZARE_LISTA_PRODUSE()
    {
        try {
            /**
             * INITIALIZARI CU NULL
             */

            id_produs = new Vector();
            quantity = new Vector();
            id_produs_comandat = new Vector();
            TAB_CLIENTI_NOI_LISTA_COMANDA.removeAll();
            TAB_CLIENTI_NOI_LISTA_PRODUSE.removeAll();
            TAB_CLIENTI_NOI_ADRESA_TextArea.setText("");
            TAB_CLIENTI_NOI_NUME_TextField.setText("");
            TAB_CLIENTI_NOI_TELEFON_TextField.setText("");
            TAB_CLIENTI_NOI_PRENUME_TextField.setText("");
            id_produs.clear();
            quantity.clear();
            id_produs_comandat.clear();
            /**
             * + ALOCAM VECTORII
             * + INSERAM PRODUSELE IN LISTA DE PRODUSE
             */
            ResultSet rs = SQL_HANDLER.genericSelect("SELECT * FROM produs");
            while(rs.next())
            {
                String rs_nume_produs = rs.getString("nume");
                Integer rs_id_produs =rs.getInt("id_produs");
                String rs_pret_produs = rs.getString("pret");
                TAB_CLIENTI_NOI_LISTA_PRODUSE.add(rs_nume_produs+ " pret: " +rs_pret_produs +" ron");
                id_produs.add(rs_id_produs);
            }
        } catch (SQLException ex) {
            Logger.getLogger(POS__admin__mode.class.getName()).log(Level.SEVERE, null, ex);
            JOptionPane.showMessageDialog(null, ex.toString());
        }
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jTabbedPane1 = new javax.swing.JTabbedPane();
        TAB_CLIENTI_EXISTENTI_Panel = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        TAB_CLIENTI_EXISTENTI_NUME_TextField = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        TAB_CLIENTI_EXISTENTI_PRENUME_TextField = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        TAB_CLIENTI_EXISTENTI_TELEFON_TextField = new javax.swing.JTextField();
        listCautareClienti = new java.awt.List();
        TAB_CLIENTI_EXISTENTI_BUTTON_CAUTA = new javax.swing.JButton();
        TAB_CLIENTI_EXISTENTI_BUTTON_RESET = new javax.swing.JButton();
        TAB_CLIENTI_EXISTENTI_BUTTON_STERGE_CLIENT_SELECTAT = new javax.swing.JButton();
        jLabel4 = new javax.swing.JLabel();
        TAB_CLIENTI_NOI_Panel = new javax.swing.JPanel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        TAB_CLIENTI_NOI_NUME_TextField = new javax.swing.JTextField();
        TAB_CLIENTI_NOI_PRENUME_TextField = new javax.swing.JTextField();
        TAB_CLIENTI_NOI_TELEFON_TextField = new javax.swing.JTextField();
        TAB_CLIENTI_NOI_LISTA_COMANDA = new java.awt.List();
        TAB_CLIENTI_NOI_LISTA_PRODUSE = new java.awt.List();
        jScrollPane1 = new javax.swing.JScrollPane();
        TAB_CLIENTI_NOI_ADRESA_TextArea = new javax.swing.JTextArea();
        jLabel8 = new javax.swing.JLabel();
        TAB_CLIENTI_NOI_STERGE_PRODUS_SELECTAT_BUTTON = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jSpinner1 = new javax.swing.JSpinner();
        jButton3 = new javax.swing.JButton();
        jLabel9 = new javax.swing.JLabel();
        TAB_GESTIONARE_COMENZIPanel = new javax.swing.JPanel();
        TAB_GESTIONARE_COMENZI_PROC_NEPROC_ComboBox = new javax.swing.JComboBox();
        TAB_GESTIONARE_COMENZIComboBox = new javax.swing.JComboBox();
        TAB_GESTIONARE_COMENZI_LUNA_ComboBox = new javax.swing.JComboBox();
        TAB_GESTIONARE_COMENZI_AN_ComboBox = new javax.swing.JComboBox();
        TAB_GESTIONARE_COMENZI_VIZUALIZARE_Button = new javax.swing.JButton();
        jScrollPane2 = new javax.swing.JScrollPane();
        TableComenzi = new javax.swing.JTable();
        GESTIONARE_COMENZI_TOTAL = new javax.swing.JTextField();
        jLabel10 = new javax.swing.JLabel();
        GESTIONARE_COMENZI_list = new java.awt.List();
        GC_NUME = new javax.swing.JTextField();
        GC_PRENUME = new javax.swing.JTextField();
        GC_TELEFON = new javax.swing.JTextField();
        jScrollPane3 = new javax.swing.JScrollPane();
        GC_ADRESA = new javax.swing.JTextArea();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        GC_CINE = new javax.swing.JTextField();
        jLabel15 = new javax.swing.JLabel();
        TAB_GESTIONARE_CLIENTI_MODIFICA_Button = new javax.swing.JButton();
        jSeparator1 = new javax.swing.JSeparator();
        jLabel16 = new javax.swing.JLabel();
        TAB_GESTIONARE_PRODUSEPanel = new javax.swing.JPanel();
        GP_DenTextField = new javax.swing.JTextField();
        jLabel17 = new javax.swing.JLabel();
        jScrollPane4 = new javax.swing.JScrollPane();
        GP_Con_TextArea = new javax.swing.JTextArea();
        jLabel18 = new javax.swing.JLabel();
        GP_ADAUGA_Button = new javax.swing.JButton();
        LabelPoza = new javax.swing.JLabel();
        jScrollPane5 = new javax.swing.JScrollPane();
        TableProduse = new javax.swing.JTable();
        jLabel20 = new javax.swing.JLabel();
        GP_PretTextField = new javax.swing.JTextField();
        jLabel21 = new javax.swing.JLabel();
        jLabel22 = new javax.swing.JLabel();
        jLabel23 = new javax.swing.JLabel();
        jLabel24 = new javax.swing.JLabel();
        jLabel25 = new javax.swing.JLabel();
        GP_DETAILS_NUMETextField = new javax.swing.JTextField();
        GP_DETAILS_PRETTextField = new javax.swing.JTextField();
        jScrollPane6 = new javax.swing.JScrollPane();
        GP_DETAILS_CONTINUTTextArea = new javax.swing.JTextArea();
        LabelPozaExistenta = new javax.swing.JLabel();
        jButton5 = new javax.swing.JButton();
        jMenuBar1 = new javax.swing.JMenuBar();
        MenuFile = new javax.swing.JMenu();
        MenuItemConfigurare = new javax.swing.JMenuItem();
        MenuItemExit = new javax.swing.JMenuItem();
        MenuHelp = new javax.swing.JMenu();
        MenuItemAbout = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jTabbedPane1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTabbedPane1MouseClicked(evt);
            }
        });

        jLabel1.setText("nume");

        jLabel2.setText("prenume");

        jLabel3.setText("telefon");

        listCautareClienti.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                listCautareClientiActionPerformed(evt);
            }
        });

        TAB_CLIENTI_EXISTENTI_BUTTON_CAUTA.setText("Cauta");
        TAB_CLIENTI_EXISTENTI_BUTTON_CAUTA.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TAB_CLIENTI_EXISTENTI_BUTTON_CAUTAActionPerformed(evt);
            }
        });

        TAB_CLIENTI_EXISTENTI_BUTTON_RESET.setText("Reset");
        TAB_CLIENTI_EXISTENTI_BUTTON_RESET.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TAB_CLIENTI_EXISTENTI_BUTTON_RESETActionPerformed(evt);
            }
        });

        TAB_CLIENTI_EXISTENTI_BUTTON_STERGE_CLIENT_SELECTAT.setText("Sterge client selectat");
        TAB_CLIENTI_EXISTENTI_BUTTON_STERGE_CLIENT_SELECTAT.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TAB_CLIENTI_EXISTENTI_BUTTON_STERGE_CLIENT_SELECTATActionPerformed(evt);
            }
        });

        jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/point/of/sale/res/pizza.jpg"))); // NOI18N

        javax.swing.GroupLayout TAB_CLIENTI_EXISTENTI_PanelLayout = new javax.swing.GroupLayout(TAB_CLIENTI_EXISTENTI_Panel);
        TAB_CLIENTI_EXISTENTI_Panel.setLayout(TAB_CLIENTI_EXISTENTI_PanelLayout);
        TAB_CLIENTI_EXISTENTI_PanelLayout.setHorizontalGroup(
            TAB_CLIENTI_EXISTENTI_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TAB_CLIENTI_EXISTENTI_PanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TAB_CLIENTI_EXISTENTI_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(listCautareClienti, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                    .addGroup(TAB_CLIENTI_EXISTENTI_PanelLayout.createSequentialGroup()
                        .addGroup(TAB_CLIENTI_EXISTENTI_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel2)
                            .addComponent(jLabel3)
                            .addComponent(jLabel1))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(TAB_CLIENTI_EXISTENTI_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(TAB_CLIENTI_EXISTENTI_NUME_TextField)
                            .addComponent(TAB_CLIENTI_EXISTENTI_PRENUME_TextField, javax.swing.GroupLayout.DEFAULT_SIZE, 151, Short.MAX_VALUE)
                            .addComponent(TAB_CLIENTI_EXISTENTI_TELEFON_TextField, javax.swing.GroupLayout.PREFERRED_SIZE, 188, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(TAB_CLIENTI_EXISTENTI_PanelLayout.createSequentialGroup()
                        .addComponent(TAB_CLIENTI_EXISTENTI_BUTTON_STERGE_CLIENT_SELECTAT)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TAB_CLIENTI_EXISTENTI_BUTTON_RESET)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TAB_CLIENTI_EXISTENTI_BUTTON_CAUTA)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 634, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        TAB_CLIENTI_EXISTENTI_PanelLayout.setVerticalGroup(
            TAB_CLIENTI_EXISTENTI_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TAB_CLIENTI_EXISTENTI_PanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TAB_CLIENTI_EXISTENTI_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel4)
                    .addGroup(TAB_CLIENTI_EXISTENTI_PanelLayout.createSequentialGroup()
                        .addGroup(TAB_CLIENTI_EXISTENTI_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel1)
                            .addComponent(TAB_CLIENTI_EXISTENTI_NUME_TextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(TAB_CLIENTI_EXISTENTI_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2)
                            .addComponent(TAB_CLIENTI_EXISTENTI_PRENUME_TextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(TAB_CLIENTI_EXISTENTI_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel3)
                            .addComponent(TAB_CLIENTI_EXISTENTI_TELEFON_TextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(TAB_CLIENTI_EXISTENTI_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(TAB_CLIENTI_EXISTENTI_BUTTON_STERGE_CLIENT_SELECTAT)
                            .addComponent(TAB_CLIENTI_EXISTENTI_BUTTON_RESET)
                            .addComponent(TAB_CLIENTI_EXISTENTI_BUTTON_CAUTA))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(listCautareClienti, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Clienti existenti", TAB_CLIENTI_EXISTENTI_Panel);

        TAB_CLIENTI_NOI_Panel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                TAB_CLIENTI_NOI_PanelMouseClicked(evt);
            }
        });

        jLabel5.setText("Nume");

        jLabel6.setText("Prenume");

        jLabel7.setText("Telefon");

        TAB_CLIENTI_NOI_LISTA_COMANDA.setBackground(java.awt.SystemColor.controlHighlight);

        TAB_CLIENTI_NOI_ADRESA_TextArea.setColumns(10);
        TAB_CLIENTI_NOI_ADRESA_TextArea.setRows(5);
        jScrollPane1.setViewportView(TAB_CLIENTI_NOI_ADRESA_TextArea);

        jLabel8.setText("Adresa");

        TAB_CLIENTI_NOI_STERGE_PRODUS_SELECTAT_BUTTON.setText("Strege produsul selectat");
        TAB_CLIENTI_NOI_STERGE_PRODUS_SELECTAT_BUTTON.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TAB_CLIENTI_NOI_STERGE_PRODUS_SELECTAT_BUTTONActionPerformed(evt);
            }
        });

        jButton2.setText("<<Adauga in lista");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        jButton3.setText("Ok");
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });

        jLabel9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/point/of/sale/res/Telephone.png"))); // NOI18N

        javax.swing.GroupLayout TAB_CLIENTI_NOI_PanelLayout = new javax.swing.GroupLayout(TAB_CLIENTI_NOI_Panel);
        TAB_CLIENTI_NOI_Panel.setLayout(TAB_CLIENTI_NOI_PanelLayout);
        TAB_CLIENTI_NOI_PanelLayout.setHorizontalGroup(
            TAB_CLIENTI_NOI_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TAB_CLIENTI_NOI_PanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TAB_CLIENTI_NOI_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(TAB_CLIENTI_NOI_LISTA_COMANDA, javax.swing.GroupLayout.DEFAULT_SIZE, 271, Short.MAX_VALUE)
                    .addGroup(TAB_CLIENTI_NOI_PanelLayout.createSequentialGroup()
                        .addComponent(jLabel8)
                        .addGap(226, 226, 226))
                    .addGroup(TAB_CLIENTI_NOI_PanelLayout.createSequentialGroup()
                        .addGroup(TAB_CLIENTI_NOI_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel6)
                            .addComponent(jLabel7)
                            .addComponent(jLabel5))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(TAB_CLIENTI_NOI_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane1, 0, 0, Short.MAX_VALUE)
                            .addComponent(TAB_CLIENTI_NOI_PRENUME_TextField, javax.swing.GroupLayout.DEFAULT_SIZE, 201, Short.MAX_VALUE)
                            .addComponent(TAB_CLIENTI_NOI_NUME_TextField, javax.swing.GroupLayout.DEFAULT_SIZE, 201, Short.MAX_VALUE)
                            .addComponent(TAB_CLIENTI_NOI_TELEFON_TextField, javax.swing.GroupLayout.DEFAULT_SIZE, 201, Short.MAX_VALUE)))
                    .addComponent(TAB_CLIENTI_NOI_STERGE_PRODUS_SELECTAT_BUTTON, javax.swing.GroupLayout.DEFAULT_SIZE, 271, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(TAB_CLIENTI_NOI_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(TAB_CLIENTI_NOI_PanelLayout.createSequentialGroup()
                        .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jSpinner1, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(TAB_CLIENTI_NOI_LISTA_PRODUSE, javax.swing.GroupLayout.DEFAULT_SIZE, 249, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 352, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        TAB_CLIENTI_NOI_PanelLayout.setVerticalGroup(
            TAB_CLIENTI_NOI_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TAB_CLIENTI_NOI_PanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TAB_CLIENTI_NOI_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(TAB_CLIENTI_NOI_PanelLayout.createSequentialGroup()
                        .addGroup(TAB_CLIENTI_NOI_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel5)
                            .addComponent(TAB_CLIENTI_NOI_NUME_TextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(TAB_CLIENTI_NOI_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel6)
                            .addComponent(TAB_CLIENTI_NOI_PRENUME_TextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(TAB_CLIENTI_NOI_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel7)
                            .addComponent(TAB_CLIENTI_NOI_TELEFON_TextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(8, 8, 8)
                        .addGroup(TAB_CLIENTI_NOI_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel8)
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(10, 10, 10)
                        .addComponent(TAB_CLIENTI_NOI_STERGE_PRODUS_SELECTAT_BUTTON)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TAB_CLIENTI_NOI_LISTA_COMANDA, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, TAB_CLIENTI_NOI_PanelLayout.createSequentialGroup()
                        .addComponent(TAB_CLIENTI_NOI_LISTA_PRODUSE, javax.swing.GroupLayout.DEFAULT_SIZE, 382, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(TAB_CLIENTI_NOI_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jButton3)
                            .addComponent(jSpinner1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jButton2)))
                    .addComponent(jLabel9))
                .addGap(79, 79, 79))
        );

        jTabbedPane1.addTab("Clienti noi", TAB_CLIENTI_NOI_Panel);

        TAB_GESTIONARE_COMENZI_PROC_NEPROC_ComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Comenzi neprocesate", "Comenzi procesate" }));

        TAB_GESTIONARE_COMENZIComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31" }));
        TAB_GESTIONARE_COMENZIComboBox.setSelectedIndex(Integer.parseInt(SQL_HANDLER.getDay()) -1);

        TAB_GESTIONARE_COMENZI_LUNA_ComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12" }));
        TAB_GESTIONARE_COMENZI_LUNA_ComboBox.setSelectedIndex(Integer.parseInt(SQL_HANDLER.getMonth()) -1);

        TAB_GESTIONARE_COMENZI_AN_ComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024", " " }));
        TAB_GESTIONARE_COMENZI_AN_ComboBox.setSelectedIndex(Integer.parseInt(SQL_HANDLER.getYear())-2010);

        TAB_GESTIONARE_COMENZI_VIZUALIZARE_Button.setText("Vizualizare");
        TAB_GESTIONARE_COMENZI_VIZUALIZARE_Button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TAB_GESTIONARE_COMENZI_VIZUALIZARE_ButtonActionPerformed(evt);
            }
        });

        TableComenzi.setModel(tmodel);
        TableComenzi.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                TableComenziMouseClicked(evt);
            }
        });
        jScrollPane2.setViewportView(TableComenzi);

        jLabel10.setText("Total de incasat");

        GC_ADRESA.setColumns(10);
        GC_ADRESA.setRows(5);
        jScrollPane3.setViewportView(GC_ADRESA);

        jLabel11.setText("Nume");

        jLabel12.setText("Prenume");

        jLabel13.setText("Nr. Telefon");

        jLabel14.setText("Adresa");

        jLabel15.setText("Cine livreaza");

        TAB_GESTIONARE_CLIENTI_MODIFICA_Button.setText("Modifica");
        TAB_GESTIONARE_CLIENTI_MODIFICA_Button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TAB_GESTIONARE_CLIENTI_MODIFICA_ButtonActionPerformed(evt);
            }
        });

        jLabel16.setText("Continut comanda");

        javax.swing.GroupLayout TAB_GESTIONARE_COMENZIPanelLayout = new javax.swing.GroupLayout(TAB_GESTIONARE_COMENZIPanel);
        TAB_GESTIONARE_COMENZIPanel.setLayout(TAB_GESTIONARE_COMENZIPanelLayout);
        TAB_GESTIONARE_COMENZIPanelLayout.setHorizontalGroup(
            TAB_GESTIONARE_COMENZIPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TAB_GESTIONARE_COMENZIPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TAB_GESTIONARE_COMENZIPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(GESTIONARE_COMENZI_list, javax.swing.GroupLayout.DEFAULT_SIZE, 216, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, TAB_GESTIONARE_COMENZIPanelLayout.createSequentialGroup()
                        .addComponent(TAB_GESTIONARE_COMENZIComboBox, 0, 62, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TAB_GESTIONARE_COMENZI_LUNA_ComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TAB_GESTIONARE_COMENZI_AN_ComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(TAB_GESTIONARE_COMENZI_PROC_NEPROC_ComboBox, 0, 216, Short.MAX_VALUE)
                    .addComponent(TAB_GESTIONARE_COMENZI_VIZUALIZARE_Button, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 216, Short.MAX_VALUE)
                    .addGroup(TAB_GESTIONARE_COMENZIPanelLayout.createSequentialGroup()
                        .addComponent(jLabel10)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(GESTIONARE_COMENZI_TOTAL, javax.swing.GroupLayout.DEFAULT_SIZE, 103, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, TAB_GESTIONARE_COMENZIPanelLayout.createSequentialGroup()
                        .addComponent(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 86, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel16)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(TAB_GESTIONARE_COMENZIPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel11, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel12, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel13, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel14, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel15, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(TAB_GESTIONARE_CLIENTI_MODIFICA_Button, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, TAB_GESTIONARE_COMENZIPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(GC_CINE, javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jScrollPane3, javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(GC_TELEFON, javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(GC_PRENUME, javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(GC_NUME, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)))
                .addContainerGap())
        );
        TAB_GESTIONARE_COMENZIPanelLayout.setVerticalGroup(
            TAB_GESTIONARE_COMENZIPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TAB_GESTIONARE_COMENZIPanelLayout.createSequentialGroup()
                .addGroup(TAB_GESTIONARE_COMENZIPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(TAB_GESTIONARE_COMENZIPanelLayout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(TAB_GESTIONARE_COMENZIPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 430, Short.MAX_VALUE)
                            .addGroup(TAB_GESTIONARE_COMENZIPanelLayout.createSequentialGroup()
                                .addComponent(TAB_GESTIONARE_COMENZI_PROC_NEPROC_ComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(TAB_GESTIONARE_COMENZIPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(TAB_GESTIONARE_COMENZIPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(TAB_GESTIONARE_COMENZI_AN_ComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(TAB_GESTIONARE_COMENZI_LUNA_ComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(TAB_GESTIONARE_COMENZIComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(TAB_GESTIONARE_COMENZI_VIZUALIZARE_Button)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(TAB_GESTIONARE_COMENZIPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel10)
                                    .addComponent(GESTIONARE_COMENZI_TOTAL, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(TAB_GESTIONARE_COMENZIPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabel16)
                                    .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(GESTIONARE_COMENZI_list, javax.swing.GroupLayout.PREFERRED_SIZE, 279, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGroup(TAB_GESTIONARE_COMENZIPanelLayout.createSequentialGroup()
                        .addGap(16, 16, 16)
                        .addComponent(jLabel11)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(GC_NUME, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel12)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(GC_PRENUME, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel13)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(GC_TELEFON, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel14)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(12, 12, 12)
                        .addComponent(jLabel15)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(GC_CINE, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TAB_GESTIONARE_CLIENTI_MODIFICA_Button)))
                .addContainerGap())
        );

        jTabbedPane1.addTab("Gestionare comenzi", TAB_GESTIONARE_COMENZIPanel);

        jLabel17.setText("Denumire produs");

        GP_Con_TextArea.setColumns(10);
        GP_Con_TextArea.setRows(5);
        jScrollPane4.setViewportView(GP_Con_TextArea);

        jLabel18.setText("Continut");

        GP_ADAUGA_Button.setText("Adauga Produs");
        GP_ADAUGA_Button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                GP_ADAUGA_ButtonActionPerformed(evt);
            }
        });

        LabelPoza.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        LabelPoza.setText("Adaugare Poza");
        LabelPoza.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));
        LabelPoza.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        LabelPoza.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                LabelPozaMouseClicked(evt);
            }
        });

        TableProduse.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        TableProduse.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                TableProduseMouseClicked(evt);
            }
        });
        jScrollPane5.setViewportView(TableProduse);

        jLabel20.setText("Pret");

        jLabel21.setText("Poza");

        jLabel22.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel22.setText("Detalii produs selectat");
        jLabel22.setBorder(javax.swing.BorderFactory.createTitledBorder(""));

        jLabel23.setText("Denumire");

        jLabel24.setText("Pret");

        jLabel25.setText("Continut");

        GP_DETAILS_CONTINUTTextArea.setColumns(14);
        GP_DETAILS_CONTINUTTextArea.setRows(5);
        jScrollPane6.setViewportView(GP_DETAILS_CONTINUTTextArea);

        jButton5.setText("Stergere produs selectat");
        jButton5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton5ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout TAB_GESTIONARE_PRODUSEPanelLayout = new javax.swing.GroupLayout(TAB_GESTIONARE_PRODUSEPanel);
        TAB_GESTIONARE_PRODUSEPanel.setLayout(TAB_GESTIONARE_PRODUSEPanelLayout);
        TAB_GESTIONARE_PRODUSEPanelLayout.setHorizontalGroup(
            TAB_GESTIONARE_PRODUSEPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TAB_GESTIONARE_PRODUSEPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TAB_GESTIONARE_PRODUSEPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel18, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(GP_DenTextField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 205, Short.MAX_VALUE)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 205, Short.MAX_VALUE)
                    .addComponent(jLabel17, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel20, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel21, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(LabelPoza, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 205, Short.MAX_VALUE)
                    .addComponent(GP_PretTextField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 205, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(GP_ADAUGA_Button))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 488, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(TAB_GESTIONARE_PRODUSEPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(LabelPozaExistenta, javax.swing.GroupLayout.DEFAULT_SIZE, 189, Short.MAX_VALUE)
                    .addGroup(TAB_GESTIONARE_PRODUSEPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addComponent(jButton5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabel23)
                        .addComponent(jLabel24)
                        .addComponent(jLabel22, javax.swing.GroupLayout.DEFAULT_SIZE, 189, Short.MAX_VALUE)
                        .addComponent(GP_DETAILS_NUMETextField)
                        .addComponent(GP_DETAILS_PRETTextField)
                        .addComponent(jLabel25)
                        .addComponent(jScrollPane6, 0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        TAB_GESTIONARE_PRODUSEPanelLayout.setVerticalGroup(
            TAB_GESTIONARE_PRODUSEPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TAB_GESTIONARE_PRODUSEPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TAB_GESTIONARE_PRODUSEPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(TAB_GESTIONARE_PRODUSEPanelLayout.createSequentialGroup()
                        .addComponent(jLabel22)
                        .addGap(31, 31, 31)
                        .addComponent(jLabel23)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(GP_DETAILS_NUMETextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(2, 2, 2)
                        .addComponent(jLabel24)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(GP_DETAILS_PRETTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel25)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButton5)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(LabelPozaExistenta, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(TAB_GESTIONARE_PRODUSEPanelLayout.createSequentialGroup()
                        .addComponent(jLabel17)
                        .addGap(10, 10, 10)
                        .addComponent(GP_DenTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel18)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel20)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(GP_PretTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel21)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(LabelPoza, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(GP_ADAUGA_Button))
                    .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(27, 27, 27))
        );

        jTabbedPane1.addTab("Gestionare produse", TAB_GESTIONARE_PRODUSEPanel);

        MenuFile.setText("File");

        MenuItemConfigurare.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK));
        MenuItemConfigurare.setText("Configurare conexiune");
        MenuItemConfigurare.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MenuItemConfigurareActionPerformed(evt);
            }
        });
        MenuFile.add(MenuItemConfigurare);

        MenuItemExit.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X, java.awt.event.InputEvent.CTRL_MASK));
        MenuItemExit.setText("Exit");
        MenuItemExit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MenuItemExitActionPerformed(evt);
            }
        });
        MenuFile.add(MenuItemExit);

        jMenuBar1.add(MenuFile);

        MenuHelp.setText("Help");

        MenuItemAbout.setText("About");
        MenuItemAbout.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MenuItemAboutActionPerformed(evt);
            }
        });
        MenuHelp.add(MenuItemAbout);

        jMenuBar1.add(MenuHelp);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 928, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 481, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void TAB_CLIENTI_EXISTENTI_BUTTON_CAUTAActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TAB_CLIENTI_EXISTENTI_BUTTON_CAUTAActionPerformed
        // TODO add your handling code here:
        TAB_CLIENTI_EXISTENTI_CAUTA();
    }//GEN-LAST:event_TAB_CLIENTI_EXISTENTI_BUTTON_CAUTAActionPerformed

    private void TAB_CLIENTI_EXISTENTI_BUTTON_RESETActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TAB_CLIENTI_EXISTENTI_BUTTON_RESETActionPerformed
        // TODO add your handling code here:
        TAB_CLIENTI_EXISTENTI_NUME_TextField.setText("");
        TAB_CLIENTI_EXISTENTI_PRENUME_TextField.setText("");
        TAB_CLIENTI_EXISTENTI_TELEFON_TextField.setText("");
        TAB_CLIENTI_EXISTENTI_CAUTA();
    }//GEN-LAST:event_TAB_CLIENTI_EXISTENTI_BUTTON_RESETActionPerformed

    @SuppressWarnings("static-access")
    private void listCautareClientiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_listCautareClientiActionPerformed
        // TODO add your handling code here:
        Clienti__existenti__onClick c_ex = new Clienti__existenti__onClick();
        c_ex.mainACA(id_client.elementAt(listCautareClienti.getSelectedIndex()));
    }//GEN-LAST:event_listCautareClientiActionPerformed

    private void TAB_CLIENTI_EXISTENTI_BUTTON_STERGE_CLIENT_SELECTATActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TAB_CLIENTI_EXISTENTI_BUTTON_STERGE_CLIENT_SELECTATActionPerformed
        // TODO add your handling code here:
        SQL_HANDLER.genericDelete(id_client.elementAt(listCautareClienti.getSelectedIndex()), "id_client", "clienti");
        TAB_CLIENTI_EXISTENTI_CAUTA();
    }//GEN-LAST:event_TAB_CLIENTI_EXISTENTI_BUTTON_STERGE_CLIENT_SELECTATActionPerformed

    private void jTabbedPane1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTabbedPane1MouseClicked
        // TODO add your handling code here:
        TAB_CLIENTI_NOI_INITIALIZARE_LISTA_PRODUSE();
        
    }//GEN-LAST:event_jTabbedPane1MouseClicked

    private void TAB_CLIENTI_NOI_PanelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_TAB_CLIENTI_NOI_PanelMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_TAB_CLIENTI_NOI_PanelMouseClicked

    private void TAB_CLIENTI_NOI_STERGE_PRODUS_SELECTAT_BUTTONActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TAB_CLIENTI_NOI_STERGE_PRODUS_SELECTAT_BUTTONActionPerformed
        // TODO add your handling code here:
       
            quantity.removeElementAt(TAB_CLIENTI_NOI_LISTA_COMANDA.getSelectedIndex());
            id_produs_comandat.removeElementAt(TAB_CLIENTI_NOI_LISTA_COMANDA.getSelectedIndex());
            TAB_CLIENTI_NOI_LISTA_COMANDA.remove(TAB_CLIENTI_NOI_LISTA_COMANDA.getSelectedIndex());
        
    }//GEN-LAST:event_TAB_CLIENTI_NOI_STERGE_PRODUS_SELECTAT_BUTTONActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        // TODO add your handling code here:
        if(Integer.parseInt(jSpinner1.getValue().toString())>0)
        {
            id_produs_comandat.add(id_produs.elementAt(TAB_CLIENTI_NOI_LISTA_PRODUSE.getSelectedIndex()));
            quantity.add(Integer.parseInt(jSpinner1.getValue().toString()));
            TAB_CLIENTI_NOI_LISTA_COMANDA.add(TAB_CLIENTI_NOI_LISTA_PRODUSE.getSelectedItem() + " x " +Integer.parseInt(jSpinner1.getValue().toString())+ " buc");
            jSpinner1.setValue(0);
        }else{
            JOptionPane.showMessageDialog(null, "NU uita sa selectezi cantitatea");
        }
    }//GEN-LAST:event_jButton2ActionPerformed

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
        try {
            // TODO add your handling code here:
            String nume = TAB_CLIENTI_NOI_NUME_TextField.getText();
            String prenume = TAB_CLIENTI_NOI_PRENUME_TextField.getText();
            String telefon = TAB_CLIENTI_NOI_TELEFON_TextField.getText();
            String adresa = TAB_CLIENTI_NOI_ADRESA_TextArea.getText();
            if(     (nume == null ? "" != null : !nume.equals(""))
                    &&
                    (prenume == null ? "" != null : !prenume.equals(""))
                    &&
                    (telefon == null ? "" != null : !telefon.equals(""))
                    &&
                    (adresa == null ? "" != null : !adresa.equals(""))
                    &&
                    TAB_CLIENTI_NOI_LISTA_COMANDA.getItemCount()>0
              )
            {
                SQL_HANDLER.clientInsert(nume, prenume, telefon, adresa);
                SQL_HANDLER.orderInsert(id_produs_comandat, quantity, id_produs_comandat.size());
                TAB_CLIENTI_NOI_INITIALIZARE_LISTA_PRODUSE();
                TAB_CLIENTI_EXISTENTI_TELEFON_TextField.setText("");
                TAB_CLIENTI_EXISTENTI_NUME_TextField.setText("");
                TAB_CLIENTI_EXISTENTI_PRENUME_TextField.setText("");
                TAB_CLIENTI_EXISTENTI_CAUTA();
            }
            else JOptionPane.showMessageDialog(null, "Toate campurile sunt obligatorii.");

        } catch (SQLException ex) {
            Logger.getLogger(POS__admin__mode.class.getName()).log(Level.SEVERE, null, ex);
            JOptionPane.showMessageDialog(null, ex.toString());
        }
    }//GEN-LAST:event_jButton3ActionPerformed

    private void TAB_GESTIONARE_CLIENTI_ON_INIT()
    {
        String qry_by_date =   "SELECT id_comanda, nume, prenume, telefon FROM clienti, comanda WHERE clienti.id_client = comanda.id_client"
                        +
                        " AND data LIKE '%"+SQL_HANDLER.getFullDate().toString()+"%'"
                        +
                        " AND este_livrata = 0";
        tmodel = new t_Model(qry_by_date);
     
        
    }
    private void TAB_GESTIONARE_COMENZI_VIZUALIZARE_ButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TAB_GESTIONARE_COMENZI_VIZUALIZARE_ButtonActionPerformed
        // TODO add your handling code here:
        int este_livrata = TAB_GESTIONARE_COMENZI_PROC_NEPROC_ComboBox.getSelectedIndex();
        String zi = TAB_GESTIONARE_COMENZIComboBox.getSelectedItem().toString();
        String luna = TAB_GESTIONARE_COMENZI_LUNA_ComboBox.getSelectedItem().toString();
        String an = TAB_GESTIONARE_COMENZI_AN_ComboBox.getSelectedItem().toString();
        String data = an +"-"+ luna+"-" + zi;
        String qry_by_date =   "SELECT id_comanda, nume, prenume, telefon FROM clienti, comanda WHERE clienti.id_client = comanda.id_client"
                        +
                        " AND data LIKE '%"+data+"%'"
                        +
                        " AND este_livrata = "+ este_livrata;
        TableComenzi.setModel(new t_Model(qry_by_date));
        TableComenzi.revalidate();
    }//GEN-LAST:event_TAB_GESTIONARE_COMENZI_VIZUALIZARE_ButtonActionPerformed

    private void TableComenziMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_TableComenziMouseClicked
        // TODO add your handling code here:
        idx = Integer.parseInt(TableComenzi.getModel().getValueAt(TableComenzi.rowAtPoint(evt.getPoint()),0).toString());
        GC_DO_THE_CLICK_MAGIC(idx);
    }//GEN-LAST:event_TableComenziMouseClicked

    
    private void LabelPozaMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_LabelPozaMouseClicked
        // TODO add your handling code here:
        s = new JFileChooser();
        int cod = s.showOpenDialog(this);
        if(JFileChooser.APPROVE_OPTION==0)
        {
            String cale = s.getSelectedFile().getAbsolutePath();
            Image initialImage = new ImageIcon(cale).getImage();
            Image finalImage = initialImage.getScaledInstance(205, 150, Image.SCALE_SMOOTH);
            icon = new ImageIcon(finalImage);

            LabelPoza.setText("");
            LabelPoza.setIcon(icon);
        }
    }//GEN-LAST:event_LabelPozaMouseClicked

    private void TableProduseMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_TableProduseMouseClicked
        // TODO add your handling code here:
        GP_DETAILS_NUMETextField.setText("");
        GP_DETAILS_PRETTextField.setText("");
        GP_DETAILS_CONTINUTTextArea.setText("");
        Object k = TableProduse.getValueAt(TableProduse.rowAtPoint(evt.getPoint()),0);
        id_produs_selectat = Integer.parseInt(k.toString());
        GP_DETAILS_NUMETextField.setText(SQL_HANDLER.getNumeProdus(id_produs_selectat));
        GP_DETAILS_PRETTextField.setText(SQL_HANDLER.getPretProdus(id_produs_selectat)+"");
        GP_DETAILS_CONTINUTTextArea.setText(SQL_HANDLER.getContinutProdus(id_produs_selectat));
        //Image initialImage = new ImageIcon(SQL_HANDLER.getCalePoza(id_produs_selectat)).getImage();
        //Image finalImage = initialImage.getScaledInstance(205, 150, Image.SCALE_SMOOTH);
        //Icon icon_2 = new ImageIcon(initialImage);

        Image initialImage = new ImageIcon(SQL_HANDLER.getCalePoza(id_produs_selectat)).getImage();
        Image finalImage = initialImage.getScaledInstance(188, 150, Image.SCALE_SMOOTH);
        ImageIcon icon_3 = new ImageIcon(finalImage);
        LabelPozaExistenta.setText("");
        LabelPozaExistenta.setIcon(icon_3);
    }//GEN-LAST:event_TableProduseMouseClicked

    private void GP_ADAUGA_ButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_GP_ADAUGA_ButtonActionPerformed
        try {
            SQL_HANDLER.insertProduct(GP_DenTextField.getText(), Float.parseFloat(GP_PretTextField.getText()), GP_Con_TextArea.getText(), null);
            //
            java.util.Date today = new java.util.Date();
            java.sql.Timestamp ts1 = new java.sql.Timestamp(today.getTime());
            String caleSrc = s.getSelectedFile().getPath();
            String ext = (caleSrc.lastIndexOf(".")==-1)?"":caleSrc.substring(caleSrc.lastIndexOf(".")+1,caleSrc.length());
            String caleRel = ts1.toString() + "."+ext;
            String caleDst = SQL_HANDLER.executionPath + "/img/" + caleRel.replace(':', '-');
            FileChannel srcChannel = new FileInputStream(caleSrc).getChannel();
            FileChannel dstChannel = new FileOutputStream(caleDst).getChannel();
            dstChannel.transferFrom(srcChannel, 0, srcChannel.size());
            srcChannel.close();
            dstChannel.close();
            int ultimulId = SQL_HANDLER.getLastInsertedProduct();
            SQL_HANDLER.insert_Image_Path(ultimulId, caleRel.replace(':', '-'));
            PRODUCT_TAB_ON_INIT();
            LabelPoza.setText(null);
            LabelPoza.setIcon(null);
        } catch (IOException ex) {
            Logger.getLogger(POS__admin__mode.class.getName()).log(Level.SEVERE, null, ex);
            JOptionPane.showMessageDialog(null, ex.toString());
        }
    }//GEN-LAST:event_GP_ADAUGA_ButtonActionPerformed

    private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed
        // TODO add your handling code here:
        SQL_HANDLER.deleteProductById(id_produs_selectat);
        PRODUCT_TAB_ON_INIT();
    }//GEN-LAST:event_jButton5ActionPerformed

    private void TAB_GESTIONARE_CLIENTI_MODIFICA_ButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TAB_GESTIONARE_CLIENTI_MODIFICA_ButtonActionPerformed
        // TODO add your handling code here:
        SQL_HANDLER.updateComanda(idx, GC_CINE.getText());
        
    }//GEN-LAST:event_TAB_GESTIONARE_CLIENTI_MODIFICA_ButtonActionPerformed

    private void MenuItemConfigurareActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MenuItemConfigurareActionPerformed
        // TODO add your handling code here:
        /////////
        Setari.mainSetari();
    }//GEN-LAST:event_MenuItemConfigurareActionPerformed

    private void MenuItemExitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MenuItemExitActionPerformed
        // TODO add your handling code here:
        System.exit(0);
    }//GEN-LAST:event_MenuItemExitActionPerformed

    private void MenuItemAboutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MenuItemAboutActionPerformed
        // TODO add your handling code here:
        AboutAP.AboutAP_main();
    }//GEN-LAST:event_MenuItemAboutActionPerformed
    private void GC_DO_THE_CLICK_MAGIC(int argIdComanda)
    {
        try {
            GC_NUME.setText("");
            GC_PRENUME.setText("");
            GC_TELEFON.setText("");
            GC_ADRESA.setText("");
            GC_CINE.setText("");
            GESTIONARE_COMENZI_list.removeAll();
            int id_client_tmp = 0;
            float total_plata = 0;
            ResultSet rsz = SQL_HANDLER.genericSelect("SELECT * FROM comanda WHERE id_comanda = " + argIdComanda);
            while(rsz.next())
            {
                id_client_tmp=rsz.getInt("id_client");
                GC_CINE.setText(rsz.getString("cine"));
            }
            ResultSet rs = SQL_HANDLER.genericSelect("SELECT * FROM continut_comanda,produs WHERE id_comanda = "+argIdComanda+" AND continut_comanda.id_produs = produs.id_produs");
            while(rs.next())
            {
                GESTIONARE_COMENZI_list.add(rs.getString("nume")+ " "+ rs.getString("pret") + " x" +rs.getString("qty")+ " buc" );
                total_plata = total_plata + rs.getFloat("pret")*rs.getFloat("qty");

            }
            ResultSet detalii_client_rs = SQL_HANDLER.genericSelect("SELECT * FROM clienti WHERE id_client= "+ id_client_tmp );
            while(detalii_client_rs.next()){
                GC_NUME.setText(detalii_client_rs.getString("nume"));
                GC_PRENUME.setText(detalii_client_rs.getString("prenume"));
                GC_TELEFON.setText(detalii_client_rs.getString("telefon"));
                GC_ADRESA.setText(detalii_client_rs.getString("adresa"));
            }
            GESTIONARE_COMENZI_TOTAL.setText(total_plata+"");
        } catch (SQLException ex) {
            Logger.getLogger(POS__admin__mode.class.getName()).log(Level.SEVERE, null, ex);
            JOptionPane.showMessageDialog(null, ex.toString());
        }


    }
    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new POS__admin__mode().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextArea GC_ADRESA;
    private javax.swing.JTextField GC_CINE;
    private javax.swing.JTextField GC_NUME;
    private javax.swing.JTextField GC_PRENUME;
    private javax.swing.JTextField GC_TELEFON;
    private javax.swing.JTextField GESTIONARE_COMENZI_TOTAL;
    private java.awt.List GESTIONARE_COMENZI_list;
    private javax.swing.JButton GP_ADAUGA_Button;
    private javax.swing.JTextArea GP_Con_TextArea;
    private javax.swing.JTextArea GP_DETAILS_CONTINUTTextArea;
    private javax.swing.JTextField GP_DETAILS_NUMETextField;
    private javax.swing.JTextField GP_DETAILS_PRETTextField;
    private javax.swing.JTextField GP_DenTextField;
    private javax.swing.JTextField GP_PretTextField;
    private javax.swing.JLabel LabelPoza;
    private javax.swing.JLabel LabelPozaExistenta;
    private javax.swing.JMenu MenuFile;
    private javax.swing.JMenu MenuHelp;
    private javax.swing.JMenuItem MenuItemAbout;
    private javax.swing.JMenuItem MenuItemConfigurare;
    private javax.swing.JMenuItem MenuItemExit;
    private javax.swing.JButton TAB_CLIENTI_EXISTENTI_BUTTON_CAUTA;
    private javax.swing.JButton TAB_CLIENTI_EXISTENTI_BUTTON_RESET;
    private javax.swing.JButton TAB_CLIENTI_EXISTENTI_BUTTON_STERGE_CLIENT_SELECTAT;
    private javax.swing.JTextField TAB_CLIENTI_EXISTENTI_NUME_TextField;
    private javax.swing.JTextField TAB_CLIENTI_EXISTENTI_PRENUME_TextField;
    private javax.swing.JPanel TAB_CLIENTI_EXISTENTI_Panel;
    private javax.swing.JTextField TAB_CLIENTI_EXISTENTI_TELEFON_TextField;
    private javax.swing.JTextArea TAB_CLIENTI_NOI_ADRESA_TextArea;
    private java.awt.List TAB_CLIENTI_NOI_LISTA_COMANDA;
    private java.awt.List TAB_CLIENTI_NOI_LISTA_PRODUSE;
    private javax.swing.JTextField TAB_CLIENTI_NOI_NUME_TextField;
    private javax.swing.JTextField TAB_CLIENTI_NOI_PRENUME_TextField;
    private javax.swing.JPanel TAB_CLIENTI_NOI_Panel;
    private javax.swing.JButton TAB_CLIENTI_NOI_STERGE_PRODUS_SELECTAT_BUTTON;
    private javax.swing.JTextField TAB_CLIENTI_NOI_TELEFON_TextField;
    private javax.swing.JButton TAB_GESTIONARE_CLIENTI_MODIFICA_Button;
    private javax.swing.JComboBox TAB_GESTIONARE_COMENZIComboBox;
    private javax.swing.JPanel TAB_GESTIONARE_COMENZIPanel;
    private javax.swing.JComboBox TAB_GESTIONARE_COMENZI_AN_ComboBox;
    private javax.swing.JComboBox TAB_GESTIONARE_COMENZI_LUNA_ComboBox;
    private javax.swing.JComboBox TAB_GESTIONARE_COMENZI_PROC_NEPROC_ComboBox;
    private javax.swing.JButton TAB_GESTIONARE_COMENZI_VIZUALIZARE_Button;
    private javax.swing.JPanel TAB_GESTIONARE_PRODUSEPanel;
    private javax.swing.JTable TableComenzi;
    private javax.swing.JTable TableProduse;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton5;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSpinner jSpinner1;
    private javax.swing.JTabbedPane jTabbedPane1;
    private java.awt.List listCautareClienti;
    // End of variables declaration//GEN-END:variables

}
